<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>demo</title>
  <script type="text/javascript" src="../vue.js"></script>
</head>

<body>
  <div id="app">
    <input type="" v-model="name" placeholder="请输入你的姓名">
    <input type="" v-model="age" placeholder="请输入你的年龄">
    <p>{{pud}}</p>
  </div>
</body>
<script type="text/javascript">
  Vue.config.productionTip = false
  const vm = new Vue({
    el: "#app",
    data() {
      return {
        name: '',
        age: ''
      }
    },
    //计算属性 为了得到一个值
    computed: {
      pud() {
        return this.name + this.age
      }
    }
  })
</script>

</html>